<template>
	<AppLayout>
		<view v-if="!isLogin" @click="toLoginPage()">请先登录</view>
		<view v-else>
			<image :src="info.avatar" />
			<view>{{ info.name }}</view>
		</view>
	</AppLayout>
</template>

<script setup lang="ts">
import AppLayout from "@/components/AppLayout/index.vue";
import { useLogin } from '@/hooks';
import { useMyStore } from "@/stores";
const { isLogin, toLoginPage } = useLogin()
const myStore = useMyStore()
const { info } = storeToRefs(myStore)
if (isLogin.value) {
	myStore.getInfo()
}

</script>

<style scoped lang="scss">

</style>
